<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<ul id="list">
		<li><a href="q">asd</a></li>
		<li><a href="s">asd</a></li>
		<li><a href="ssss">asd</a></li>
		<li><a href="ss">asd</a></li>
		<li><a href="zxc">asd</a></li>
	</ul>


	<script>
		window.onload = function() {
			var list=document.getElementById('list');
			var lis=list.getElementsByTagName('a');
			for(var i=0;i<lis.length;i++) {
				lis[i].onclick=function() {
					var hf=this.getAttribute('href');
					console.log(hf)
					return false;
				}
			}
		}
	</script>
</body>
</html>